<?php
include '../../operations/connection.php';

$idboard = $_REQUEST['idboard'];
$action = $_REQUEST['action'];
$newlang = $_REQUEST['newlang'];

if ($_REQUEST['newlang'] == "EN") {
	include "../../value/value_en.php";
} else if($_REQUEST['newlang'] == "VN") {
	include "../../value/value_vn.php";
}
else {
	include "../../value/value_kr.php";
}

if ($action=='edit'){
	$sqledit = "SELECT * FROM board where ID ='$idboard' ";
	$result = mysql_fetch_assoc(mysql_query($sqledit));
	$title = $result[Title];
	$content = $result[Content];
	$idemployee = $result[IDEmployee];
	$type = $result[Type];
}else{
	$title= "";
	$content ="";
}
?>

<style>
.cke_contents {
	height: 400px !important;
}
.cke_skin_kama{
width: 100% !important;
}
a[title="Browse Server"] {
	display: none !important;
}

a[title="Duyệt trên máy chủ"] {
	display: none !important;
}

a[title="서버 보기"] {
	display: none !important;
}

a[title="Link"] {
	display: none !important;
}

a[title="Liên kết"] {
	display: none !important;
}

a[title="링크"] {
	display: none !important;
}

a[title="Advanced"] {
	display: none !important;
}

a[title="Tab mở rộng"] {
	display: none !important;
}

a[title="자세히"] {
	display: none !important;
}

tr td.cke_bottom {
	display: none !important;
}
</style>

<link
	href="css/style.css" rel="stylesheet" type="text/css" />

<div style="margin-left: 5px;">
	<div style="height: 10px;"></div>
	<form action="admin/employeemanagement/process-add-new-notice.php"
		method="get">
		<input type="hidden" name='idboard' value="<?=$idboard?>" /> <input
			type="hidden" name='action' value="<?=$action?>" />
		<div class="navigation-button" style="background-color: #eef1f3;">
			<a href="" onclick="onclickback(this);"><img
				src="images/back-admin.png" /> </a>
			<div><?php echo $l_back?></div>
		</div>

		<div class="navigation-button" style="background-color: #eef1f3;">
			<a href=""><input type="submit" name="save" id="save" value=""
				style="background: url('images/save-admin.png') no-repeat 40px center;
				 width: 100px; height: 30px;border-bottom: none;border-right: none;cursor: pointer;"></a>
				  <div><?php echo $l_save?></div>
		</div>
		<?php if ($action=='edit'){?>
		<div class="navigation-button" style="background-color: #eef1f3;">
			<a href="#" onclick="if(confirm('Are you sure?')){ processDeleteNotice('<?=$idboard?>','<?=$idemployee?>',this);return true;}else{return false;}"><img
				src="images/trash.gif" /> </a>
			<div><?php echo $l_delete?></div>
		</div>
		<?php }?>
		<div class="navigation-button" style="background-color: #eef1f3;">
			<a id="preview"><img src="images/view.png" /> </a>
			<div><?php echo $l_preview?></div>
		</div>
		<br style="clear: both" /> <br />


		<table class="new-board" width="100%" cellspacing="5" cellpadding="5">
			<tr>
				<td align="right">
					<table style="width: 350px; padding-right: 60px">
						<tr>
						<?php if($type=="VN"){?>
							<td><input id="valueradio" type="radio" name="valueradio"
								value="VN" checked="checked" /> <label> <?php echo $l_vnoffice?></label>
							</td>
							<td><input id="valueradio" type="radio" name="valueradio"
								value="KR" /> <label> <?php echo $l_koreaoffice?></label></td>
						<?php }else if($type=="KR"){?>
							<td><input id="valueradio" type="radio" name="valueradio"
								value="VN"/> <label> <?php echo $l_vnoffice?></label>
							</td>
							<td><input id="valueradio" type="radio" name="valueradio"
								value="KR"  checked="checked" /> <label> <?php echo $l_koreaoffice?></label></td>
							<?php }else{?>
							<td><input id="valueradio" type="radio" name="valueradio"
								value="VN"/> <label> <?php echo $l_vnoffice?></label>
							</td>
							<td><input id="valueradio" type="radio" name="valueradio"
								value="KR" /> <label> <?php echo $l_koreaoffice?></label></td>
							<?php }?>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td><?php echo $l_title?><br /> <input id="title" name="title" type="text"
					value="<?php echo $title?>" style="width: 100%; height: 19px;" />
				</td>
			</tr>
			<tr>
				<td style="width:100%"><?php echo $l_content?><br /> <textarea rows="" cols="" id="ncontent"
						class="ncontent" name="ncontent" style="width: 100%">
						<?php echo $content?>
				</textarea>
				</td>

			</tr>
		</table>
	</form>
</div>
